package com.lotus.tep;

import chrriis.dj.nativeswing.swtimpl.NativeInterface;
import com.lotus.tep.ui.FrameBuilder;
import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;

public class Launch {

	public static void main(String[] args) {
		NativeInterface.initialize();
		NativeInterface.open();
		SwingUtilities.invokeLater(new Runnable() {
			@Override
			public void run() {
				JFrame frame = new FrameBuilder().newBrowserFrame();
				Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
				int p = 2;
				dim.width /= p;
				dim.height /= p;
				frame.setSize(dim);
				frame.setPreferredSize(dim);
				frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
				frame.setVisible(true);
			}
		});
		NativeInterface.runEventPump();
	}
}
